package com.yidu.hbatsams.service.Impl;

import com.yidu.hbatsams.dao.AtsBaseSportItemMapper;
import com.yidu.hbatsams.domain.AtsBaseSportItem;
import com.yidu.hbatsams.service.AtsBaseSportItemService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * auto：ltx
 * 项目管理Service
 */
@Service
public class AtsBaseSportItemServiceImpl implements AtsBaseSportItemService {
    @Resource
    private AtsBaseSportItemMapper atsBaseSportItemMapper;

    @Override
    public List<AtsBaseSportItem> findId(Integer sportId, Integer isva) {

        return atsBaseSportItemMapper.findId(sportId,isva);
    }

    /**
     * 根据id删除
     * @param siId
     * @return
     */
    @Override
    public int deleteByPrimaryKey(Integer siId) {
        return atsBaseSportItemMapper.deleteByPrimaryKey(siId);
    }

    /**
     * 插入
     * @param record
     * @return
     */
    @Override
    public int insert(AtsBaseSportItem record) {
        return atsBaseSportItemMapper.insert(record);
    }

    /**
     * 非空插入
     * @param record
     * @return
     */
    @Override
    public int insertSelective(AtsBaseSportItem record) {
        return atsBaseSportItemMapper.insertSelective(record);
    }

    /**
     * 根据id查询
     * @param siId
     * @return
     */
    @Override
    public AtsBaseSportItem selectByPrimaryKey(Integer siId) {
        return atsBaseSportItemMapper.selectByPrimaryKey(siId);
    }

    /**
     * 修改数据
     * @param record
     * @return
     */
    @Override
    public int updateByPrimaryKeySelective(AtsBaseSportItem record) {
        return atsBaseSportItemMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(AtsBaseSportItem record) {
        return atsBaseSportItemMapper.updateByPrimaryKey(record);
    }

    /**
     * 查询所有
     * @param sportName
     * @return
     */
    @Override
    public List<AtsBaseSportItem> selectALL(String sportName) {
        return atsBaseSportItemMapper.selectALL(sportName);
    }

    /**
     * 根据体育项目查询所有指标
     * @param sportId
     * @return
     */
    @Override
    public List<AtsBaseSportItem> selectId(Integer sportId) {
        return atsBaseSportItemMapper.selectId(sportId);
    }

    @Override
    public List<AtsBaseSportItem> selectItme(Integer itemId) {
        return atsBaseSportItemMapper.selectItme(itemId);
    }

    @Override
    public int deleteItemSport(Integer sportId, Integer ItemId) {
        return atsBaseSportItemMapper.deleteItemSport(sportId,ItemId);
    }

    @Override
    public List<AtsBaseSportItem> selectItemSport(Integer itemId, Integer sportId) {
        return atsBaseSportItemMapper.selectItemSport(itemId,sportId);
    }

}
